home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 August (Alt) / CHIP 2005-08.1.iso / program / guvenlik / syslinux-3.07.exe / sample / skipatou.c < prev    next >
Encoding:
C/C++ Source or Header  |  2003-12-10  |  200 b   |  15 lines

  1. static inline int
  2. isdigit(int ch)
  3. {
  4.   return (ch >= '0') && (ch <= '9');
  5. }
  6.  
  7. unsigned int skip_atou(const char **s)
  8. {
  9.   int i=0;
  10.   
  11.   while (isdigit(**s))
  12.     i = i*10 + *((*s)++) - '0';
  13.   return i;
  14. }
  15.